package com.ljwm.entity;

import com.baomidou.mybatisplus.enums.IdType;
import java.util.Date;
import com.baomidou.mybatisplus.annotations.TableId;
import com.baomidou.mybatisplus.activerecord.Model;
import com.baomidou.mybatisplus.annotations.TableName;
import java.io.Serializable;


import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;

/**
 * <p>
 * USER TABLE
 * </p>
 *
 * @author Y_QS
 * @since 2018-05-22
 */
@Data
@Accessors(chain = true)
@TableName("t_user")
@EqualsAndHashCode(callSuper = false)
@ApiModel(value = "USER TABLE", subTypes = {User.class})
public class User extends Model<User> {

    private static final long serialVersionUID = 1L;


    @ApiModelProperty(value = "ID")
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    @ApiModelProperty(value = "ACCOUNT")
    private String username;

    @ApiModelProperty(value = "PASSWORD")
    private String password;

    @ApiModelProperty(value = "SALT")
    private String salt;

    @ApiModelProperty(value = "0 ENABLE 1 DISABLE")
    private Integer status;

    @ApiModelProperty(value = "LASTMODIFYPASSWORDTIME")
    private Date lastmodifyPassTime;


    public static final String ID = "id";

    public static final String USERNAME = "username";

    public static final String PASSWORD = "password";

    public static final String SALT = "salt";

    public static final String STATUS = "status";

    public static final String LASTMODIFYPASSTIME = "lastmodifyPassTime";

    @Override
    protected Serializable pkVal() {
        return this.id;
    }

}
